import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:ff_flutter/routes/app_routes.dart';

class OpenVip extends StatelessWidget {
  void _handleTap() {
    Get.toNamed(AppRoutes.VIP);
    print('点击了打开VIP');
  }

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: 30.w),
      child: GestureDetector(
        onTap: _handleTap,
        child: Container(
          height: 110.h,
          decoration: BoxDecoration(
            color: const Color(0xFF393939),
            borderRadius: BorderRadius.circular(30.r),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  SizedBox(width: 32.w),
                  Image.asset(
                    'assets/images/account_vip.png',
                    width: 48.w,
                    height: 48.h,
                  ),
                  SizedBox(width: 24.w),
                  Text(
                    'Open VIP',
                    style: TextStyle(
                      color: Colors.white,
                      fontSize: 32.sp,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ],
              ),
              Padding(
                padding: EdgeInsets.only(right: 32.w),
                child: Icon(
                  Icons.chevron_right,
                  color: Colors.white,
                  size: 48.sp,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
